import {Platform} from 'react-native';
import {Navigation} from 'react-native-navigation';
import {registerScreens, registerScreenVisibilityListener} from './views/index';


// screen related book keeping
registerScreens();
registerScreenVisibilityListener();


const tabs = [{
  label: '首页',
  screen: 'yimei.Home',
  icon: require('../img/home_icon.png'),
  title: '首页',
  navigatorButtons: {
    rightButtons: [{
      icon: require('../img/search_icon.png'),
      passProps: {}, 
    }], 
    animated: true 
  }
}, {
  label: '采购',
  screen: 'yimei.Home',
  icon: require('../img/target_icon.png'),
  title: '采购',
}, {
  label: '我的',
  screen: 'yimei.Home',
  icon: require('../img/header_icon.png'),
  title: '我的',
}];


// this will start our app
Navigation.startTabBasedApp({
  tabs,
  animationType: Platform.OS === 'ios' ? 'slide-down' : 'fade',
  tabsStyle: {
    tabBarBackgroundColor: '#fff',
    tabBarSelectedButtonColor: '#F18726',
    tabFontFamily: 'BioRhyme-Bold',
    tabBarTextFontSize:10,
  },
  appStyle: {
    navBarTextColor: '#585858',
    navigationBarColor: '#fff',
    navBarBackgroundColor: '#fff',
    statusBarColor: '#002b4c',
    navBarNoBorder:false
  }

});
